<div class="pagination">
<?php
if($_GET["p"] != 1)
	echo "<a href=\"?m=$menu&p=1\"><< first</a>";
else
	echo "<span class=\"disabled\"><< first</span>";
for($i=$_GET["p"]-4;$i<=$_GET["p"]+4;$i++)
{
	if($i>0 && $i<=$halaman)
	{
		if($_GET["p"] == $i)
			echo "<span class=\"current\">$i</span>";
		else
			echo "<a href=\"?m=$menu&p=$i\">$i</a>";
	}
}
if($_GET["p"] < $halaman)
	echo "<a href=\"?m=$menu&p=$halaman\">last >></a>";
else
	echo "<span class=\"disabled\">last >></span>";
?>		
</div>